<?

	/* Theme functions, these are called from the main theme or the blog system */
	
	
	function drawProfile() {
		global $blogname,$profileimg;
		
		echo "\r\n";
		echo "\t<div id='profile'>\r\n";
		if ($profileimg) echo "\t\t<img src='".$profileimg."'/>\r\n";
		echo "\t\t<h1><a href='?'>".$blogname."</a></h1>";
		echo "\r\n";
		echo "\t</div>";
		echo "<div style='clear:both;'> </div>";
	}


	$groupDate="";

	function theme_drawTweet(
			$itemAction,
			$itemCaption,
			$itemPost,
			$itemLink,
			$itemCommentLink,
			$itemDate,
			$itemServiceName,
			$itemTrueDate)
	{
		global $groupDate;
						
				$tweet="";
						$capdate=date("Ymd",$itemTrueDate);
						
						if ($capdate!=$groupDate) {
							$groupDate=$capdate;

							$tweet.="<div class='date_cal'>";
							$tweet.="<div class='month'>".substr(date("F",$itemTrueDate),0,3)."</div>";
							$tweet.="<br/><div class='day'>".date("d",$itemTrueDate)."</div>";
							$tweet.="</div>";
							
						}
							
						$tweet.="<div id='tweet'>";
							
						//$tweet.="<h1>".$itemDate."</h1>";
						$tweet.="<h3>".$itemAction." |  ".$itemCommentLink."</h3>";
						
						if ($itemCaption) $tweet.=$itemCaption."<a href='".$itemLink."'>&#187;</a><br/>";
						$tweet.=$itemPost;
						
						$tweet.="</div>";
						$tweet.="<div style='clear:both;'> </div>";
						return $tweet;
	}



?>
